home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93a.txt / 000083_icon-group-sender _Thu Mar 11 08:06:50 1993.msg < prev    next >
Internet Message Format  |  1993-04-21  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 11 Mar 1993 09:49:57 MST
  2. Message-Id: <9303111604.AA33376@enlil.premenos.sf.ca.us>
  3. From: Ken Walker <kwalker@shara.premenos.sf.ca.us>
  4. Subject: Re: Icon :-> C | ADA translator wanted.
  5. To: icon-group@cs.arizona.edu
  6. Date: Thu, 11 Mar 93 8:06:50 PST
  7. In-Reply-To: <4719.9303111124@desktop.desktop.co.uk>; from "Steve Holden" at Mar 11, 93 11:24 am
  8. Mailer: Elm [revision: 66.25]
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. > From: Steve Holden <steve@dtc.co.uk>
  13. >
  14. > Well, you might try "iconc -c", the Icon compiler with the
  15. > final C-to-object step omitted.  The C it produces can only
  16. > be described as somewhat obfuscated, though. 
  17.  
  18. Yes, the code is really not meant for human consumption. The biggest
  19. problem is automatic storage management. When an Icon varaible is
  20. represented in C it must be accessable to the garbage collector.
  21. This means that Icon variables are not represented as simple C
  22. variables. In addition, Icon variables are untyped, so their C
  23. representation must, in general, include run-time type information.
  24. There are probably schemes for representing variables that would
  25. result in better looking code than the compiler now produces and
  26. making better use of information from type inferencing could also
  27. help, but I think that producing human maintainable C code from
  28. an Icon compiler would be quite difficult. It is worth noting that
  29. automatic storage management causes problems for maintaining the
  30. Icon run-time system and it is written with the goal of being
  31. maintainable.
  32.  
  33. The other obvious problem is goal-directed evaluation. The compiler
  34. goes through some contortions to translate the control flow mechanisms
  35. of Icon into the more mundane mechanisms of C. Much of the time it
  36. manages to produce fairly reasonable C code, but other times the
  37. result looks rather odd.
  38.  
  39. Ken Walker, kwalker@premenos.sf.ca.us
  40.